package me.zhengjie.business.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.business.domain.vo.Kc20Vo;
import me.zhengjie.business.service.YbryService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @website https://el-admin.vip
 * @author xiahongbo
 * @date 2022-06-02
 **/
@RestController
@RequiredArgsConstructor
@Api(tags = "医保人员")
@RequestMapping("/api/ybry")
public class YbryController {

    private final YbryService ybryService;

    @GetMapping
    @ApiOperation("查询医保人员")
    public ResponseEntity<Object> queryYbry(String sfzh) {
        Map<String, Object> m = ybryService.queryAll(sfzh);
        ResponseEntity<Object> rs = new ResponseEntity<>(m,HttpStatus.OK);
        System.out.println("=========="+rs);
        return rs;
    }

    @GetMapping(value = "/queryKc20")
    @ApiOperation("查询人员待遇")
    public ResponseEntity<Object> queryKc20(String rybm) {
        Kc20Vo kc20 = ybryService.queryKc20(rybm);
        return new ResponseEntity<>(kc20, HttpStatus.OK);
    }
}
